-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug-1737]: Check if CSM is Authorization Proxy Server by checking module name #893
Conversation
399092a
to
b0d1fc3
Compare
c496393
to
c13199e
Compare
if instance.GetName() != "" && instance.GetName() != string(csmv1.Authorization) && instance.GetName() != string(csmv1.ApplicationMobility) { | ||
if instance.GetName() != "" && !isAuthorizationProxyServer(instance) && instance.GetName() != string(csmv1.ApplicationMobility) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this change? Does the authorization proxy server only exist for auth v1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instance.GetName() != string(csmv1.Authorization)
checks if the Authorization CSM name is authorization
. Assuming the user doesn't modify the default name in the sample, it'll work. If the user changes the CSM name, this check fails and reconciling will have issues.
A better check to determine if a CSM is the Authorization Server is to check the module name for authoriztion-proxy-server
, which isAuthorizationProxyServer
does.
Description
When calculating state, the CSM name is checked to determine if the CSM is the Authorization Proxy Server or not. If the CSM name is not the default name,
authorization
, reconciling fails. Determining if the CSM is the Authorization Proxy Server or not should be be hardened by checking if a module name in the spec isauthorization-proxy-server
.Changes:
authorization-controller
when checking Authorization statusgo mod tidy
intests/e2e
to make build pass in image scan actionGitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
Updated and new unit tests. Installed Authorization using default and non-default names.